import { getToken } from '@/utils/auth'
import { applyMiddleware, createStore } from 'redux'
import { composeWithDevTools } from 'redux-devtools-extension'
import thunk from 'redux-thunk'

import reducers from './reducer'

const store = createStore(
  reducers,
  { login: getToken() },
  composeWithDevTools(applyMiddleware(thunk))
)

export default store
